//数据类型验证
import {customeStruct} from '../utils';
const itf = customeStruct.interface;
export const List = itf({
    payload: itf({
        content: [itf(Object.assign({
            id: 'string',
            code: 'string',
            name: 'string',
            branchCode: 'string',
            status: 'number',
            rowVersion: 'string',
        }))],
        totalElements: 'number',
    })
});

export const Detail = itf({
    payload: itf({
        content: itf({
            id: 'string',
            code: 'string',
            name: 'string',
            rowVersion: 'string'
        })
    })
});

export const DealerList = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            code: 'string',
            name: 'string',
            branchCode: 'string',
            contactNumber: 'string? | null',
            address: 'string? | null',
        })]
    })
});

export const DealerSelectList = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            code: 'string',
            name: 'string',
            shortCode: 'string? | null',
            shortName: 'string? | null',
            countryName: 'string? | null',
            provinceName: 'string? | null',
            cityName: 'string? | null',
            contactPhone: 'string? | null',
            address: 'string? | null',
        })],
    })
});

export const MarketDepartmentList = itf({
    payload: [itf({
        id: 'string',
        code: 'string',
        name: 'string',
        isLeaf: 'boolean',
    })]
});

export const RegionList = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            name: 'string',
        })],
    })
});
